﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;
using PmSoft.Core.Domain.Entities.Caching;
using PmSoft.Core.Domain.Entities;
using PmSoft.Data.Abstractions.Attributes;

namespace Demo.Domains.Entities.Sys;

/// <summary>
/// 行政区划信息
///</summary>
[Table("sys_area")]
[CacheSetting(true)]
[Description("行政区划信息")]
public class SysArea : Entity<int>
{
	/// <summary>
	/// 区划代码
	/// </summary>
	[PrimaryKey("id")]
	public override int Id { get; set; }
	/// <summary>
	/// 上级区划代码 
	///</summary>
	[Column("pid")]
	public int Pid { get; set; }
	/// <summary>
	/// 深度 
	///</summary>
	[Column("deep")]
	public int Deep { get; set; }
	/// <summary>
	/// 区划名称 
	///</summary>
	[Column("name")]
	public string Name { get; set; }
}
